package com.example.mapper;

import com.example.pojo.Owner;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OwnerMapper {
    List<Owner> selectAll(Owner owner);

    @Select("select * from owner where id = #{id}")
    Owner selectById(Integer id);

    void add(Owner owner);

    void updateById(Owner owner);

    @Delete("delete from owner where id = #{id}")
    void deleteById(Integer id);

    @Select("select * from owner where username = #{username}")
    Owner selectByUsername(String username);
}
